package com.imoblife.brainwavestus.util;

import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.Key;
import java.security.KeyPairGenerator;
import java.security.SecureRandom;

import javax.crypto.KeyGenerator;

import android.content.Context;
import android.util.Log;

public class EncryptionTask implements Runnable {

	public void run() {
		

	}

	/**
	 * ���DES���ܵ���Կ���ڽ��״���Ĺ����Ӧ�ö�ʱ�� ����Կ����ҪJCE��֧�֣����jdk�汾����1.4������Ҫ
	 * ��װjce-1_2_2������ʹ�á�
	 * 
	 * @return Key ���ضԳ���Կ
	 */
	public static Key getKey(Context inContext) {
		Key kp = null;
		try {

			InputStream is = inContext.getClassLoader().getResourceAsStream(
					"key.properties");
			ObjectInputStream oos = new ObjectInputStream(is);

			kp = (Key) oos.readObject();
			oos.close();
		} catch (Exception e) {
			e.printStackTrace();
			Log.d("d", "sakmfsfsdf'sdmfsdl'fsdl");

		}
		return kp;
	}

}
